import Actions from './actions';
import Reflux from 'reflux';


module.exports = Reflux.createStore({
  listenables: [Actions],
  data: {
    activeIndex: 0,
  },

  onTabBarChange: function (params) {
    let t = this;
    t.data.activeIndex = params;
    t.updateComponent()

  },

  updateComponent: function () {
    this.trigger(this.data);
  },

  getInitialState: function () {
    return this.data;
  }
})
;
